using System;
using System.Xml.Serialization;

namespace Schedulr.Configuration
{
    /// <summary>
    /// Represents a <see cref="Picture"/> that has been uploaded.
    /// </summary>
    [Serializable]
    public class UploadedPicture : Picture
    {
        #region Properties

        private DateTime uploaded;

        /// <summary>
        /// Gets or sets the date and time the picture was uploaded.
        /// </summary>
        [XmlAttribute]
        public DateTime Uploaded
        {
            get { return this.uploaded; }
            set { this.uploaded = value; }
        }

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="UploadedPicture"/> class.
        /// </summary>
        public UploadedPicture()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="UploadedPicture"/> class.
        /// </summary>
        /// <param name="picture">The picture to clone.</param>
        public UploadedPicture(Picture picture)
            : base(picture)
        {
            this.Uploaded = DateTime.Now;
        }

        #endregion
    }
}